.class public Lrexsee/keyboard/KeyboardWidget;
.super Lrexsee/core/widget/Div;
.source "KeyboardWidget.java"


# direct methods
.method public constructor <init>(Lrexsee/core/browser/Browser;Lrexsee/keyboard/KeyboardParameters;)V
    .locals 7
    .param p1, "browser"    # Lrexsee/core/browser/Browser;
    .param p2, "para"    # Lrexsee/keyboard/KeyboardParameters;

    .prologue
    .line 17
    invoke-virtual {p1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v4

    invoke-direct {p0, v4}, Lrexsee/core/widget/Div;-><init>(Landroid/content/Context;)V

    .line 18
    new-instance v1, Landroid/widget/LinearLayout;

    iget-object v4, p0, Lrexsee/keyboard/KeyboardWidget;->mContext:Landroid/content/Context;

    invoke-direct {v1, v4}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    .line 19
    .local v1, "layout":Landroid/widget/LinearLayout;
    const/4 v4, 0x1

    invoke-virtual {v1, v4}, Landroid/widget/LinearLayout;->setOrientation(I)V

    .line 20
    const/16 v4, 0x50

    invoke-virtual {v1, v4}, Landroid/widget/LinearLayout;->setGravity(I)V

    .line 21
    const/4 v4, 0x0

    invoke-virtual {v1, v4}, Landroid/widget/LinearLayout;->setBackgroundColor(I)V

    .line 23
    invoke-virtual {p2, p1}, Lrexsee/keyboard/KeyboardParameters;->getMenus(Lrexsee/core/browser/Browser;)Ljava/util/ArrayList;

    move-result-object v2

    .line 24
    .local v2, "menus":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lrexsee/core/menu/PopMenu;>;"
    if-eqz v2, :cond_0

    .line 25
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_0
    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v4

    if-lt v0, v4, :cond_1

    .line 32
    .end local v0    # "i":I
    :cond_0
    invoke-virtual {p0, v1}, Lrexsee/keyboard/KeyboardWidget;->addChild(Landroid/view/View;)V

    .line 34
    iget-object v4, p0, Lrexsee/keyboard/KeyboardWidget;->styleSheet:Lrexsee/core/style/StyleSheet;

    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "border-width:0px;"

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v6, p2, Lrexsee/keyboard/KeyboardParameters;->keyboardStyle:Ljava/lang/String;

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Lrexsee/core/style/StyleSheet;->parseStyle(Ljava/lang/String;)Lrexsee/core/style/StyleSheet;

    .line 35
    invoke-virtual {p0}, Lrexsee/keyboard/KeyboardWidget;->setDivStyleWithoutLayoutParams()V

    .line 37
    return-void

    .line 26
    .restart local v0    # "i":I
    :cond_1
    invoke-virtual {v2, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v4

    if-eqz v4, :cond_2

    .line 27
    new-instance v3, Lrexsee/core/widget/TabButtonRow;

    invoke-virtual {p1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v5

    invoke-virtual {v2, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lrexsee/core/menu/PopMenu;

    invoke-direct {v3, v5, v4}, Lrexsee/core/widget/TabButtonRow;-><init>(Landroid/content/Context;Lrexsee/core/menu/PopMenu;)V

    .line 28
    .local v3, "row":Lrexsee/core/widget/TabButtonRow;
    invoke-virtual {v1, v3}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    .line 25
    .end local v3    # "row":Lrexsee/core/widget/TabButtonRow;
    :cond_2
    add-int/lit8 v0, v0, 0x1

    goto :goto_0
.end method
